@isTest
private class QuoteWebServiceTest {
    static testMethod void testMethod1() {
        // 客户
        Account acc = TestUtils.createAccount();
        insert acc;

        // 业务机会
        Opportunity opp = TestUtils.createOpportunity();
        opp.AccountId = acc.Id;
        insert opp;

        // 报价
        Quote q = new Quote(
            Name = 'test',  
            OpportunityId = opp.Id
        );
        insert q;

        // 报价产品
        QuoteProduct__c qp = new QuoteProduct__c(
            Quote__c = q.Id
        );
        insert qp;

        // String rtn = QuoteWebService.postQuote(q.Id, '1');

        // 拷贝
        String newid = QuoteWebService.copyQuote(q.Id);
        Quote newq = [select Name from Quote where Id = :newid];
        System.assertEquals('Copy:test', newq.Name);

        // 调价
        // String adjustid = QuoteWebService.adjustQuote(qp.Id);
        // Quote adjustq = [select Name from Quote where Id = :adjustid];
        // System.assertEquals('调价:test', adjustq.Name);

        // adjustq.Status = '已批准';
        // update adjustq;
    }
}